const express = require('express')
const app = express()

app.use((req, res, next) => {
  console.log('common middleware 01')
  next()
})
app.get('/home', (req, res, next) => {
  console.log('home middleware 01')
  next()
}, (req, res, next) => {
  console.log('home middleware 02')
  next()
}, (req, res, next) => {
  console.log('home middleware 03')
  next()
}, (req, res, next) => {
  console.log('home middleware 04')
  res.end('home page')
})
app.listen(8000, (req, res, next) => {
  console.log('服务器启动成功')
})